//
//  FirstViewController.m
//  tableview
//
//  Created by qianfneg on 15/9/9.
//  Copyright (c) 2015年 qianfneg. All rights reserved.
//

#import "FirstViewController.h"
#import "FistTableViewCell.h"
@interface FirstViewController ()

@end

@implementation FirstViewController{
    UITableView * _dataview;
    NSMutableArray * _Array;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createTitle:@"特卖"];
    [self createValue];
  
    // Do any additional setup after loading the view.
}

-(void)createValue{
    _dataview = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.KSize.width, self.KSize.height - 49) style:UITableViewStyleGrouped];
    _dataview.delegate = self;
    _dataview.dataSource = self;
    
    [self.view addSubview:_dataview];

 
}


#pragma mark - UITableviewdelegate

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
//    return  _Array.count;
    return 10;
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 3;

}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

    return 0.1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 0.1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 200;

}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"FistTableViewCellID" ];
    if (!cell) {
        cell = [[NSBundle mainBundle]loadNibNamed:@"FistTableViewCell" owner:nil options:nil][0];
    }
    
    for (id subview in cell.subviews) {
        [subview removeFromSuperview];
    }
    
    
    return cell;


}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
